package com.edu.study.base.stuCourseExercisesResult.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.edu.study.base.stuCourseExercisesResult.domain.CompositionPage;
import com.edu.study.base.stuCourseExercisesResult.domain.StuCourseExercisesResult;
import org.apache.ibatis.annotations.Param;

/**
 * 课后练习结果汇总Mapper接口
 * 
 * @author zw
 * @date 2021-08-30
 */
public interface StuCourseExercisesResultMapper extends BaseMapper<StuCourseExercisesResult>
{
    /**
     * 查询课后练习结果汇总
     * 
     * @param id 课后练习结果汇总ID
     * @return 课后练习结果汇总
     */
    public StuCourseExercisesResult selectStuCourseExercisesResultById(Long id);

    /**
     * 查询课后练习结果汇总列表
     * 
     * @param stuCourseExercisesResult 课后练习结果汇总
     * @return 课后练习结果汇总集合
     */
    public List<StuCourseExercisesResult> selectStuCourseExercisesResultList(StuCourseExercisesResult stuCourseExercisesResult);

    /**
     * 查询某个试题的答题结果
     * @param stuCourseExercisesResult
     * @return
     */
    public List<StuCourseExercisesResult> selectStuCourseExercisesAnswnerResult(StuCourseExercisesResult stuCourseExercisesResult);

    /**
     * 查询待批改的作业
     * @param stuCourseExercisesResult
     * @return
     */
    public List<StuCourseExercisesResult> selectTeacherTaskList(StuCourseExercisesResult stuCourseExercisesResult);

    /**
     * 新增课后练习结果汇总
     * 
     * @param stuCourseExercisesResult 课后练习结果汇总
     * @return 结果
     */
    public int insertStuCourseExercisesResult(StuCourseExercisesResult stuCourseExercisesResult);
    public int insertStuCourseExercisesResultList(List<StuCourseExercisesResult> stuCourseExercisesResultList);

    /**
     * 修改课后练习结果汇总
     * 
     * @param stuCourseExercisesResult 课后练习结果汇总
     * @return 结果
     */
    public int updateStuCourseExercisesResult(StuCourseExercisesResult stuCourseExercisesResult);

    /**
     * 删除课后练习结果汇总
     * 
     * @param id 课后练习结果汇总ID
     * @return 结果
     */
    public int deleteStuCourseExercisesResultById(Long id);

    /**
     * 批量删除课后练习结果汇总
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteStuCourseExercisesResultByIds(Long[] ids);

    IPage<CompositionPage> page4CompositionByMemberId(@Param("page") Page page, @Param("memberId") String memberId);

}
